<?php
namespace ImiApp\Module\Member\Service\Base;

use Imi\Model\Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 课程订单 基类
 * @Entity
 * @Table(name="sc_jigou_class_order", id={"id"})
 * @DDL("CREATE TABLE `sc_jigou_class_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `admin_id` int(10) unsigned DEFAULT NULL COMMENT '机构id',
  `class_id` int(10) DEFAULT NULL COMMENT '课程id',
  `order` varchar(30) DEFAULT NULL COMMENT '订单号',
  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  `pay_time` int(10) DEFAULT NULL COMMENT '支付时间',
  `pay_status` enum('1','2','3','4','5','6','7','8','9','10') DEFAULT '1' COMMENT '支付状态:1=待支付,2=已支付,9=申请退款中,10=已退款',
  `uid` int(10) DEFAULT NULL COMMENT '用户',
  `price` decimal(10,2) DEFAULT NULL COMMENT '原价',
  `money` decimal(10,2) DEFAULT NULL COMMENT '实际支付价格',
  `ps` varchar(255) DEFAULT NULL COMMENT '备注',
  `use_nums` int(10) DEFAULT '0' COMMENT '已上课程数',
  `use_ids` varchar(255) DEFAULT NULL COMMENT '已上的课程',
  `change_status` enum('1','2','3','4') DEFAULT '1' COMMENT '转课状态:1=否,2=申请中,3=已转课,4=已拒绝',
  `change_class_id` int(10) DEFAULT NULL COMMENT '改变后的课程id',
  `nouse_nums` int(10) DEFAULT NULL COMMENT '剩余课程数',
  `off_switch` tinyint(4) DEFAULT '1' COMMENT '冻结:0=冻结,1=正常',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='课程订单'")
 * @property int $id 
 * @property int $adminId 机构id
 * @property int $classId 课程id
 * @property string $order 订单号
 * @property int $createtime 创建时间
 * @property int $payTime 支付时间
 * @property string $payStatus 支付状态:1=待支付,2=已支付,9=申请退款中,10=已退款
 * @property int $uid 用户
 * @property float $price 原价
 * @property float $money 实际支付价格
 * @property string $ps 备注
 * @property int $useNums 已上课程数
 * @property string $useIds 已上的课程
 * @property string $changeStatus 转课状态:1=否,2=申请中,3=已转课,4=已拒绝
 * @property int $changeClassId 改变后的课程id
 * @property int $nouseNums 剩余课程数
 * @property int $offSwitch 冻结:0=冻结,1=正常
 */
abstract class ScJigouClassOrderBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 机构id
     * admin_id
     * @Column(name="admin_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $adminId;

    /**
     * 获取 adminId - 机构id
     *
     * @return int
     */ 
    public function getAdminId()
    {
        return $this->adminId;
    }

    /**
     * 赋值 adminId - 机构id
     * @param int $adminId admin_id
     * @return static
     */ 
    public function setAdminId($adminId)
    {
        $this->adminId = $adminId;
        return $this;
    }

    /**
     * 课程id
     * class_id
     * @Column(name="class_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $classId;

    /**
     * 获取 classId - 课程id
     *
     * @return int
     */ 
    public function getClassId()
    {
        return $this->classId;
    }

    /**
     * 赋值 classId - 课程id
     * @param int $classId class_id
     * @return static
     */ 
    public function setClassId($classId)
    {
        $this->classId = $classId;
        return $this;
    }

    /**
     * 订单号
     * order
     * @Column(name="order", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $order;

    /**
     * 获取 order - 订单号
     *
     * @return string
     */ 
    public function getOrder()
    {
        return $this->order;
    }

    /**
     * 赋值 order - 订单号
     * @param string $order order
     * @return static
     */ 
    public function setOrder($order)
    {
        $this->order = $order;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 支付时间
     * pay_time
     * @Column(name="pay_time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $payTime;

    /**
     * 获取 payTime - 支付时间
     *
     * @return int
     */ 
    public function getPayTime()
    {
        return $this->payTime;
    }

    /**
     * 赋值 payTime - 支付时间
     * @param int $payTime pay_time
     * @return static
     */ 
    public function setPayTime($payTime)
    {
        $this->payTime = $payTime;
        return $this;
    }

    /**
     * 支付状态:1=待支付,2=已支付,9=申请退款中,10=已退款
     * pay_status
     * @Column(name="pay_status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $payStatus;

    /**
     * 获取 payStatus - 支付状态:1=待支付,2=已支付,9=申请退款中,10=已退款
     *
     * @return string
     */ 
    public function getPayStatus()
    {
        return $this->payStatus;
    }

    /**
     * 赋值 payStatus - 支付状态:1=待支付,2=已支付,9=申请退款中,10=已退款
     * @param string $payStatus pay_status
     * @return static
     */ 
    public function setPayStatus($payStatus)
    {
        $this->payStatus = $payStatus;
        return $this;
    }

    /**
     * 用户
     * uid
     * @Column(name="uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $uid;

    /**
     * 获取 uid - 用户
     *
     * @return int
     */ 
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 用户
     * @param int $uid uid
     * @return static
     */ 
    public function setUid($uid)
    {
        $this->uid = $uid;
        return $this;
    }

    /**
     * 原价
     * price
     * @Column(name="price", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var float
     */
    protected $price;

    /**
     * 获取 price - 原价
     *
     * @return float
     */ 
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * 赋值 price - 原价
     * @param float $price price
     * @return static
     */ 
    public function setPrice($price)
    {
        $this->price = $price;
        return $this;
    }

    /**
     * 实际支付价格
     * money
     * @Column(name="money", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var float
     */
    protected $money;

    /**
     * 获取 money - 实际支付价格
     *
     * @return float
     */ 
    public function getMoney()
    {
        return $this->money;
    }

    /**
     * 赋值 money - 实际支付价格
     * @param float $money money
     * @return static
     */ 
    public function setMoney($money)
    {
        $this->money = $money;
        return $this;
    }

    /**
     * 备注
     * ps
     * @Column(name="ps", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $ps;

    /**
     * 获取 ps - 备注
     *
     * @return string
     */ 
    public function getPs()
    {
        return $this->ps;
    }

    /**
     * 赋值 ps - 备注
     * @param string $ps ps
     * @return static
     */ 
    public function setPs($ps)
    {
        $this->ps = $ps;
        return $this;
    }

    /**
     * 已上课程数
     * use_nums
     * @Column(name="use_nums", type="int", length=10, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $useNums;

    /**
     * 获取 useNums - 已上课程数
     *
     * @return int
     */ 
    public function getUseNums()
    {
        return $this->useNums;
    }

    /**
     * 赋值 useNums - 已上课程数
     * @param int $useNums use_nums
     * @return static
     */ 
    public function setUseNums($useNums)
    {
        $this->useNums = $useNums;
        return $this;
    }

    /**
     * 已上的课程
     * use_ids
     * @Column(name="use_ids", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $useIds;

    /**
     * 获取 useIds - 已上的课程
     *
     * @return string
     */ 
    public function getUseIds()
    {
        return $this->useIds;
    }

    /**
     * 赋值 useIds - 已上的课程
     * @param string $useIds use_ids
     * @return static
     */ 
    public function setUseIds($useIds)
    {
        $this->useIds = $useIds;
        return $this;
    }

    /**
     * 转课状态:1=否,2=申请中,3=已转课,4=已拒绝
     * change_status
     * @Column(name="change_status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $changeStatus;

    /**
     * 获取 changeStatus - 转课状态:1=否,2=申请中,3=已转课,4=已拒绝
     *
     * @return string
     */ 
    public function getChangeStatus()
    {
        return $this->changeStatus;
    }

    /**
     * 赋值 changeStatus - 转课状态:1=否,2=申请中,3=已转课,4=已拒绝
     * @param string $changeStatus change_status
     * @return static
     */ 
    public function setChangeStatus($changeStatus)
    {
        $this->changeStatus = $changeStatus;
        return $this;
    }

    /**
     * 改变后的课程id
     * change_class_id
     * @Column(name="change_class_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $changeClassId;

    /**
     * 获取 changeClassId - 改变后的课程id
     *
     * @return int
     */ 
    public function getChangeClassId()
    {
        return $this->changeClassId;
    }

    /**
     * 赋值 changeClassId - 改变后的课程id
     * @param int $changeClassId change_class_id
     * @return static
     */ 
    public function setChangeClassId($changeClassId)
    {
        $this->changeClassId = $changeClassId;
        return $this;
    }

    /**
     * 剩余课程数
     * nouse_nums
     * @Column(name="nouse_nums", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $nouseNums;

    /**
     * 获取 nouseNums - 剩余课程数
     *
     * @return int
     */ 
    public function getNouseNums()
    {
        return $this->nouseNums;
    }

    /**
     * 赋值 nouseNums - 剩余课程数
     * @param int $nouseNums nouse_nums
     * @return static
     */ 
    public function setNouseNums($nouseNums)
    {
        $this->nouseNums = $nouseNums;
        return $this;
    }

    /**
     * 冻结:0=冻结,1=正常
     * off_switch
     * @Column(name="off_switch", type="tinyint", length=4, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $offSwitch;

    /**
     * 获取 offSwitch - 冻结:0=冻结,1=正常
     *
     * @return int
     */ 
    public function getOffSwitch()
    {
        return $this->offSwitch;
    }

    /**
     * 赋值 offSwitch - 冻结:0=冻结,1=正常
     * @param int $offSwitch off_switch
     * @return static
     */ 
    public function setOffSwitch($offSwitch)
    {
        $this->offSwitch = $offSwitch;
        return $this;
    }

}
